package top.yekongle.threadpool.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import top.yekongle.threadpool.service.AsyncTask;

/**
 * @author Hank Lau
 * @date 2022/7/16
 */
@Slf4j
@RestController
public class LogController {

	@Autowired
	private AsyncTask asyncTask;

	@GetMapping("/testLog")
	public String testLog1() {
//		log.debug("hello world");

		log.info("hello world");

//		log.error("hello world");
		asyncTask.testLog2();

		asyncTask.testLog3();
		return "success";
	}



}
